﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../include/head.jspf"%>
<%@ include file="../include/communParam.jspf"%>
<script type="text/javascript" src="resource/js/communParam.js"></script>
<link rel="stylesheet" href="resource/css/css.css" type="text/css" media="screen" />
<title>东方易云后台管理系统</title>
<style>
body { background: #f5f5f5 ;}
</style>
<script>
function addSendChannel(){
	var errorMsg = "";
	errorMsg += sl_checkInteger($("#fiId")[0], "发送通道ID", 18, 1);
	errorMsg += sl_check($("#fcChannelDesc")[0], "发送通道描述", 200, 1);
	errorMsg += sl_check($("#fcCommunParam")[0], "物理地址", 200, 1);
	errorMsg += sl_checkChoice(document.getElementsByName("fiFlag"), "状态");
	errorMsg += sl_checkOption($("#fcCommunType")[0], "传输方式");
	errorMsg += sl_checkOption($("#fcMsgFormateId")[0], "报文格式");
	errorMsg += sl_checkOption($("#fcMsgType")[0], "报文类型");
	errorMsg += sl_checkOption($("#fcMsgCharset")[0], "报文编码");
	if(errorMsg != ""){
		alert(errorMsg);
	}else{
		$('#addForm').submit();
	}
}
	
	
</script>
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="js/pngfix.js"></script>
<![endif]-->
</head>
<body>
<form method="post" action="sendChannelAddSubmit" id="addForm">
<input type="hidden" name="pageNo" value="<c:out value='${pageNo}' />"/>
<input type="hidden" name="fiIdSelect" value="<c:out value='${fiIdSelect }' />"/>
<input type="hidden" name="fcMsgFormateIdSelect" value="<c:out value='${fcMsgFormateIdSelect}' />"/>
<input type="hidden" name="fcMsgTypeSelect" value="<c:out value='${fcMsgTypeSelect}' />"/>
<input type="hidden" name="fcCommunTypeSelect" value="<c:out value='${fcCommunTypeSelect }' />"/>
<div id="body-wrapper">
  <!-- Wrapper for the radial gradient background -->
  <div id="main-content">
    <!-- Main Content Section with everything -->
    <!-- Page Head -->
    <div id="page-title">
    <h3>新建发送方式</h3></div>
    <div class="pgline"></div>
    <div class="notification querytj png_bg">
      <div>
       <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	  <tbody>
        <tr>
          <td width="14%" align="right"  height="35">发送通道ID：</td>
          <td width="35%" align="left"><input type="text" id="fiId" name="fiId"  class="input2" readonly="readonly" value="<c:out value="${fiId}"/>"/></td>
          <td width="16%" align="right" height="35">发送通道描述：</td>
          <td width="35%" align="left"><input type="textarea" id="fcChannelDesc" name="fcChannelDesc"  class="input2" /></td>
        </tr>
        
        <tr>
          <td width="14%" align="right" height="35">传输方式：</td>
          <td width="35%" >
          	<select name="fcCommunType" id="fcCommunType" class="select1" onchange="resetCommunParam();" >
          		<option value="">-</option>
	            <c:forEach items="${optionCommunTypeMap}" var="one">
	              <option value="<c:out value="${one.key }" />"><c:out value="${one.value }" /></option>
	            </c:forEach>
            </select>
           </td>
          <td width="16%" align="right" height="35">物理地址：</td>
          <td width="35%" align="left"><input type="text" id="fcCommunParam" name="fcCommunParam"  class="input2"  readonly="readonly" onclick="show()"/></td>
        </tr>
        
        <tr>
          <td width="14%" align="right"  height="35">报文格式：</td>
          <td width="35%" align="left">
            <select name="fcMsgFormateId" id="fcMsgFormateId" class="select1" >
            	<option value="">-</option>
	            <c:forEach items="${optionMsgFormatMap}" var="one">
	              <option value="<c:out value="${one.key }" />"><c:out value="${one.value }" /></option>
	            </c:forEach>
            </select>
		  </td>
          <td width="16%" align="right"  height="35">报文类型：</td>
          <td width="35%" align="left">
            <select name="fcMsgType" id="fcMsgType" class="select1" >
            	<option value="">-</option>
	            <c:forEach items="${optionMsgTypeMap}" var="one">
	              <option value="<c:out value="${one.key }" />"><c:out value="${one.value }" /></option>
	            </c:forEach>
            </select>
		  </td>
        </tr>
        
        <tr>
          <td width="14%" align="right" height="35">报文编码：</td>
          <td width="35%" align="left">
		  <select name="fcMsgCharset" id="fcMsgCharset" class="select1" >
		  		<option value="">-</option>
	      	<c:forEach items="${optionMsgCharsetMap}" var="one">
	        	<option value="<c:out value="${one.key }" />"><c:out value="${one.value }" /></option>
	      	</c:forEach>
          </select>
		  </td>
		  <td width="16%" height="35" align="right">状态：</td>
		  <td height="35">
		  	<c:forEach items="${optionFiFlagMap}" var="one">
	        	<input name="fiFlag" id="fiFlag" type="radio" style="border-width:0" value="<c:out value="${one.key }" />" <c:out value="${1==one.key?'Checked':''}"/>/><c:out value="${one.value }" />
	        </c:forEach>
	      </td>
        </tr>

		</tbody>
		<tfoot>
        <tr>
          <td>&nbsp;</td>
          <td  height="35" ><a class="button" href="javascript:void(0);" onclick="addSendChannel();">保存</a>&nbsp;&nbsp;<a class="button" href="javascript:void(0)" onclick="history.go(-1)"> 取消</a></td>
        </tr>
		</tfoot>
      </table>
      </div>
    </div>
    <div class="clear"></div>
  </div>
  <!-- End #main-content -->
</div>
</form>
</body>
</html>
